package com.yuanyu.controller.staff;

import com.yuanyu.common.util.ResultInfoUtil;
import com.yuanyu.model.vo.ResultInfo;
import com.yuanyu.server.IStaffSever;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/staff")
public class StaffController {
    @Autowired
    private IStaffSever iStaffSever;

    @GetMapping("/gongxuData/{process}/{page}")
    public ResultInfo gongxuPageData( @PathVariable("process") String process,@PathVariable("page") Integer page) {
        return ResultInfoUtil.buildSuccess(iStaffSever.queryPaginatedData(process,page));
    }
    @GetMapping("/gongxuData/{process}")
    public ResultInfo gongxuSize( @PathVariable("process") String process) {
        return ResultInfoUtil.buildSuccess(iStaffSever.queryPaginatedPage(process));
    }
    @GetMapping("/gongxuData/byCase/{Case}")
    public ResultInfo gongxuByCase( @PathVariable("Case") String Case) {
        return ResultInfoUtil.buildSuccess(iStaffSever.queryByCase(Case));
    }
}
